import bpy
from bpy.types import Panel

class TOM_PT_Tool(Panel):
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_label = "图形工具"
    bl_category = "TOM工具"
    
    def draw(self,context):
        layout = self.layout
        
        row = layout.row()
        col = row.column()
        col.operator("object.draw_panel",text = "平面")
        
        col = row.column()
        col.operator("object.draw_cube",text = "正方体")

        row = layout.row()
        col = row.operator("object.draw_sphere",text="球")
        col = row.column()
        col.operator("object.draw_cylinder",text = "圆柱")

        row = layout.row()
        col = row.column()
        col.operator("object.draw_pipe",text = "管线")
        col = row.column()
        col.operator('object.draw_hexageon',text = "六边形")

        row = layout.row()
        col = row.column()
        col.operator("object.draw_bisection",text = "切割示例")
        col = row.column()
        col.operator('object.draw_wall',text = "中线墙")

        row = layout.row()
        col = row.column()
        col.operator("object.draw_face",text = "面")
        col = row.column()
        col.operator('object.draw_triangle',text = "管线2")


        row = layout.row()
        col = row.column()
        col.operator("object.import_obj",text = "导入obj")
        col = row.column()
        col.operator("object.auto_draw_pipe",text = "通过geojson(三维)画管线")
